1. Field of the Invention
The invention generally relates to a data protection method, and more particularly, to method for protecting data in damaged memory cells by dynamically switching the memory mode.
2. Description of Related Art
Along with the development of electronic technology, storage medium has become a key factor in information exchange, wherein memory has become the most indispensable storage medium for computers thanks to its high operation speed. However, since the requirement to transmission speed has increased with the increasing data transmission capacity, the demand to large-capacity and high-speed memories has increased too.
However, at the same time of increasing the capacity of a memory, the density of memory cells in the memory is also increased. Accordingly, the size of each memory cell has to be reduced when the density of semiconductor memory devices in an integrated circuit (IC) is increased. Thus, the process for fabricating memory cells of reduced size without sacrificing the original capacitance thereof becomes very complicated, and more errors are likely to be produced in such memory cells when the system access speed is high.
Errors produced in a memory may be correctable errors (CEs) or uncorrectable errors (UEs). A CE is usually a single bit error (SBE) or a multi-bit error (MBE) in which the number and position of the error bits are within a correctable range of an electronic device. A CE can be flexibly corrected through an error detection and correction (EDC) technique.
Conventionally, a spare memory module is configured in a memory such that data can be backed up when a CE is detected in the memory. On the other hand, conventionally, half of a memory is configured as a mirror memory, and the mirror memory is used for data correction when an UE is detected in the memory.
However, the prior art statically selects the mirror memory mode or the spare memory mode to protect the data of the memory cells through the menu items of the basis input output system (BIOS) in the beginning of starting up, and then the memory mode is used constantly until the system is restarted. Since each memory mode respectively has its own protection target, i.e. the uncorrectable error or the correctable error, and enough memory capacity is necessary for activating the protection function, once an error occurs during the operations of the system, redundant lost would be generated, such that the function for protecting the memory is failed and good redundant memory pages are wasted.